package com.example.hp.qingyi.company.fragment.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;

import java.util.List;

public class FragmentViewPagerAdapter extends FragmentStatePagerAdapter {
    private List<Fragment> fragment_list;

    public FragmentViewPagerAdapter(FragmentManager fm, List<Fragment> fragment_list) {
        super(fm);
        this.fragment_list = fragment_list;
    }

    @Override
    public Fragment getItem(int position) {
        return fragment_list.get(position);
    }

    @Override
    public int getCount() {
        return fragment_list.size();
    }
}

